package com.yanqu.road.server.cmd.activity.zhenhuan.cross.thirdProcess;

import com.yanqu.road.entity.enums.eGamePlayerEventType;
import com.yanqu.road.entity.enums.eLogMoneyType;
import com.yanqu.road.entity.player.PlayerState;
import com.yanqu.road.logic.activity.zhenhuan.ZhenHuanThirdProcessConfig;
import com.yanqu.road.message.YanQuMessage;
import com.yanqu.road.pb.activity.ZhenHuanProto;
import com.yanqu.road.server.cmd.base.AbstractCommand;
import com.yanqu.road.server.command.Cmd;
import com.yanqu.road.server.gameplayer.GamePlayer;
import com.yanqu.road.server.gameplayer.module.activity.zhenhuan.ZhenHuanThirdProcessModule;
import com.yanqu.road.server.gameplayer.module.player.CurrencyModule;
import com.yanqu.road.server.manger.activity.zhenhuan.ZhenHuanConfigMgr;
import com.yanqu.road.server.manger.activity.zhenhuan.ZhenHuanMgr;
import com.yanqu.road.server.manger.player.GamePlayerMgr;
import com.yanqu.road.server.protocol.Protocol;
import com.yanqu.road.utils.property.Property;

@Cmd(code = Protocol.S_ZHENHUAN_THIRD_PROCESS_BANQUET_SCORE_NOTICE_FROM_CROSS, desc = "跨服同步积分同步")
public class ZhenHuanThirdProcessBanquetScoreNoticeFromCrossCmd extends AbstractCommand {

    @Override
    public boolean parseData(YanQuMessage packet) throws Exception {
        return true;
    }

    @Override
    public void execute(GamePlayer player, YanQuMessage packet) throws Exception {
        ZhenHuanProto.CrossZhenHuanThirdProcessBanquetScoreNotifyMsg reqMsg = ZhenHuanProto.CrossZhenHuanThirdProcessBanquetScoreNotifyMsg.parseFrom(packet.getBytes());
        ZhenHuanThirdProcessConfig config = ZhenHuanConfigMgr.getThirdProcessConfig();
        if (config == null) {
            return;
        }
        if (config.getActivityInfo().getActivityId() != reqMsg.getActivityId()) {
            return;
        }
        ZhenHuanMgr.addTask(packet.getCode(), packet.getPlayerId(), packet.getBytes());
    }

    @Override
    public void sendData(GamePlayer player) {

    }
}
